package com.stdspringboot.service.impl;

import com.stdspringboot.entity.Register;
import com.stdspringboot.mapper.IRegisterDAO;
import com.stdspringboot.service.IRegisterService;
import org.springframework.stereotype.Service;

import javax.annotation.Resource;
import java.util.Date;


@Service
public class RegisterSrvImpl implements IRegisterService {

    @Resource
    private IRegisterDAO dao;

    @Override
    public int save(Register register) {

        Date date=new Date();
        register.setCreateTime(date);
        return dao.insert(register);
    }
}
